#include "stdafx.h"
#include <LitTimer.h>

namespace Lit
{
	Timer::Timer(){}
	Timer::Timer( const Timer& rk ) : mStart(rk.mStart), mStop(rk.mStop){}
	Timer::~Timer(){}
	Timer& Timer::operator=( const Timer& rk ){ mStart = rk.mStart; mStop = rk.mStop; return *this; }

	Timer::Traits Timer::start()
	{
		mStart = clock();
		return mStart;
	}

	Timer::Traits Timer::stop()
	{
		mStop = clock();
		return mStop;
	}

	Timer::Traits Timer::elapsedMSec() const{ return mStop - mStart; }
	float Timer::elapsedSec() const{ return ((float)elapsedMSec()) / CLOCKS_PER_SEC; }
};